<?php


require("db_conn.php");
require("function.php");
 $sql="SELECT * FROM prod_b ";   //写新闻类别查询语句  
    $typers=$db->query($sql); //执行语句  $rs是一个结果集
    $tprows=$typers->fetch_all(MYSQLI_BOTH); 
    
$typeid=isset($_GET['id'])?$_GET['id']:-1;
    if ($typeid==-1)
       $sql="select a.*,b.typename from prod a,prod_b b  where a.typeid=b.id ";   //写新闻查询语句  
    else
       $sql="select a.*,b.typename from prod a,prod_b b  where a.typeid=b.id and a.typeid=$typeid";
   $porr=$db->query($sql); //执行语句  $rs是一个结果集
$porrows=$porr->fetch_all(MYSQLI_BOTH);  
require 'products_and_solution_html.php';
//释放结果集
//$result->free();
//关闭数据库
$db->close();